CREATE EXTERNAL TABLE IF NOT EXISTS spmi_ods.yl_jms_spmi_piece_bill_face_count_sum_pt(
id                                                 bigint                         COMMENT '主键ID',
type                                               bigint                         COMMENT '类型1为正常统计 2为差额统计',
send_network_id                                    bigint                         COMMENT '寄件网点ID',
send_network_name                                  String                         COMMENT '寄件网点名称',
send_network_code                                  String                         COMMENT '寄件网点编码',
send_financial_center_id                           bigint                         COMMENT '寄件财务中心',
send_financial_center_name                         String                         COMMENT '寄件财务中心名称',
send_financial_center_code                         String                         COMMENT '寄件财务中心编码',
bill_generation_date                               String                         COMMENT '产生日期',
count                                              bigint                         COMMENT '票数',
create_date                                        String                         COMMENT '统计日期',
create_time                                        String                         COMMENT '统计时间',
lock_flag                                          bigint                         COMMENT '1为锁账',
sales_price                                        Double                         COMMENT '网点申购价格',
base_dispatch_fee                                  Double                         COMMENT '物料基础派费单价',
sec_no_fee                                         Double                         COMMENT '总部面单号段费单价',
sec_no_center_fee                                  Double                         COMMENT '代理面单号段费单价',
base_dispatch_fee_sum                              Double                         COMMENT '基础派费',
sec_no_fee_sum                                     Double                         COMMENT '总部面单号段费',
sec_no_center_fee_sum                              Double                         COMMENT '代理面单号段费',
count_before                                       bigint                         COMMENT '票数（含2020年运单录入票数）',
is_enable                                          bigint                         COMMENT '网点状态是否启用',
end_business_time                                  timestamp                      COMMENT '退网时间',
is_push_ncc                                        bigint                         COMMENT '是否推送NCC 1是 2否'
)
COMMENT '派件费面单量日汇总统计表'
PARTITIONED BY (dt STRING COMMENT '更新/创建日期 (yyyy-MM-dd)')
STORED AS PARQUET
LOCATION '/dw/hive/spmi_ods.db/external/yl_jms_spmi_piece_bill_face_count_sum_pt'
TBLPROPERTIES (
  'parquet.column.index.access'='true'
)